<#--作废-->
﻿	<div class="head">
		<div class="index"> <a href="#" onclick="setHome(this,window.location)">设为首页</a> | <a  href="#" onclick="addFav()">加入收藏夹</a> </div>
		<div class="login"><a href="${base}/regist">【注册用户】</a><#if spaceName?exists><a href="${base}/user/index/">【${spaceName}】</a><#else><a href="#" onClick="openLoginDialog()">【会员登陆】</a></#if></div>
	</div>
	<div class="ad" id="ad">
		<div class="meimeilogo"><a href="${base}/index/"><img  src="${base}/images/meimeilogo.jpg" style="border:0" /></div></a>
	</div>
<script language="JavaScript">
function setHome(obj, vrl){
    try {
        obj.style.behavior = 'url(#default#homepage)';
        obj.setHomePage(vrl);
    } 
    catch (e) {
        if (window.netscape) {
            try {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            } 
            catch (e) {
                alert("抱歉！您的浏览器不支持直接设为首页。");
            }
            var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
            prefs.setCharPref('browser.startup.homepage', vrl);
        }
    }
}

function addFav(){
    if (document.all) {
        window.external.addFavorite('http://www.meimei.cn/', 'Stores Gate - Portal');
    }
    else 
        if (window.sidebar) {
            window.sidebar.addPanel('Stores Gate - Portal', 'http://www.meimei.cn/', "");
        }
}
</script> 


	<div id="login_div" style="position:absolute;z-index:1000000;width:570px;display:none;border:1px solid;background:#ffffff;padding:10px;border:1px solid #bfbfbf;font-size:13px; text-align:center;">
	<div class="bgff" style="width:550px; height:232px " >
		<form id="loginForm" name="loginForm" method="post" action="${base}/login!login" >
		<div  class="color6 font13 l">
			<table cellpadding="0" cellspacing="10" border="0">
				<tr>
					<td width="60px" align="right" >E-Mail:</td>
					<td align="left"><input id="login_email" type="text" class="dl_input"  size="35"  name="user.email"/></td>
				</tr>
				<tr>
					<td  align="right" >密码:</td>
					<td align="left"><input id="login_password" type="password" class="dl_input"  size="35" name="user.password" /></td>
				</tr>
				<#--<tr>
					<td  align="right" ></td>
					<td align="left"><span id="pass_message"><input type="radio" name="o" class="bgff" />个人MOKO&nbsp;<input type="radio" name="o" class="bgff" />机构MOKO<br /><input type="checkbox"  class="bgff"/>记住登录状态</td>
				</tr>-->
				<tr>
					<td align="right" class="bga" ><a href="#" hidefocus  class="color9">忘记密码</a></td><td align="center"><Div style="background-color:#ff0198; width:256px; height:42px"><div style="margin:3px; border:1px dashed #ffffff; text-align:center">
					<input type="button" onClick="login()" value="登录" class=" font14 weight700 colorf bodred"  style="padding:5px 30px; background:#ff0198; " hidefocus onfocus="this.blur()"/></div></div></td>
				</tr>
				<tr>
					<td align="right" ></td>
					<td align="center">
						<input type="button" value="注册"  class="bgff font14 weight700 mainColor bodredd"  style="padding:10px 70px;" onClick="window.location= '${base}/regist'"/>
					</td>
				</tr>
			</table>
		</div>
		<div class="r" style="margin-top:11px"><img  src="${base}/images/loginr0.jpg" /></div>
		</form>
	</div>
	</div>
<script>
	function openLoginDialog(){
		dialog("登陆", "id:login_div", "580px", "260px", "id");
	}
function login(){
    $.ajax({
        type: "post",
        dataType: "json",
        url: base + "/login!check?time=" + new Date().getTime(),
        async: false,
        data: {
            "user.email": $("#login_email").val(),
            "user.password": $("#login_password").val()
        },
        success: function(pass){
            if (pass == "2") {
                $("#pass_message").html("");
                $("#loginForm").submit();
            }
            else {
                $("#pass_message").html("用户、邮箱或密码有误");
            }
        }
    });
}
</script>